<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 

<script>
$(function(){
	$("select[name='dealer.dealerLevel.id']").val("${dealer.dealerLevel.id}");
});

</script>
	<div class="pageContent">
	<form method="post" action="${rootUrl}/member/dealer/${dealer.id}/upgradeTop" class="pageForm required-validate" onsubmit="return validateCallback(this, editDialogAjaxDone);">
	<div class="pageFormContent" layoutH="56" >
			<p>
				<label>分销商名称：</label>
				<input name="" type="text" size="20" value="${dealer.name}" readonly="readonly"/>
			</p>
			<p>
				<label>级别：</label>
				<c:if test="${dealer.dealerLevel.level == 1}"><input name=""  type="text" size="20" value="普通会员" readonly="readonly" />	</c:if>
				<c:if test="${dealer.dealerLevel.level == 2}"><input name=""  type="text" size="20" value="普通分销商" readonly="readonly" />	</c:if>
				<c:if test="${dealer.dealerLevel.level == 3}"><input name=""  type="text" size="20" value="金牌分销商" readonly="readonly" />	</c:if>
				<c:if test="${dealer.dealerLevel.level == 4}"><input name=""  type="text" size="20" value="普通代理" readonly="readonly" />	</c:if>
				<c:if test="${dealer.dealerLevel.level == 5}"><input name=""  type="text" size="20" value="金牌代理" readonly="readonly" />	</c:if>
			</p>
			<p>
				<label>升级为：</label>
				<select name="dealer.dealerLevel.id">
					<c:forEach items="${dealerLevelList }" var="dealerLevel">
					<option value="${dealerLevel.id }">${dealerLevel.name}</option>
					</c:forEach>
				</select>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button id="theSubmit" type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
	 </div>